Fix GitHub Enterprise host handling#70
Merged
gkaleta merged 2 commits intoAzure-Samples:mainfrom May 1, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the setup/authentication flow in doctor.sh to better support GitHub Enterprise by making the GitHub host configurable.
Changes:
- Introduces a
GITHUB_HOSTenvironment variable (defaulting togithub.com). - Passes the configured host into
copilot loginvia--host.
Show a summary per file
| File | Description |
|---|---|
doctor.sh |
Adds GITHUB_HOST defaulting and uses it when invoking copilot login. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 2
| echo -e "${BLUE}🔐 Authenticating with GitHub Copilot...${NC}" | ||
| echo "" | ||
| if ! copilot login; then | ||
| if ! copilot login --host "https://${GITHUB_HOST}"; then |
There was a problem hiding this comment.
copilot login --host "https://${GITHUB_HOST}" will produce an invalid URL if GITHUB_HOST is provided with a scheme already (e.g., https://ghe.example.com → https://https://...). Consider normalizing GITHUB_HOST (accept either hostname or full URL) before building the --host argument, and reuse the same host for the PAT instructions URL in this setup flow so GitHub Enterprise users aren’t directed to github.com.
Contributor
Review Summary for PR #70Overall
Build & Test Result
Code Changes Applied
Acceptance Criteria Coverage
Observations
|
- Fix comment typo (space after #, closing quote) - Add scheme-stripping for GITHUB_HOST to prevent double-scheme bug - Update PAT URL to use GITHUB_HOST for GHE support - Remove extra blank line
Contributor
|
@Mariangeles-2025 please test it again with the changes in your environment (as I cannot reproduce it) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.